class_name BowAttackAbilitySpec
extends GameplayAbilitySpec

var arrow_prefab = preload("res://scenes/equipments/arrow.tscn")


func _on_target_set() -> void:
	pass


func _apply() -> void:
	var arrow = arrow_prefab.instantiate() as Arrow
	
	arrow.face_direction = ability.owner.logic_owner.face_direction
	arrow.global_position = ability.owner.logic_owner.global_position
	
	ObjectPool.add_child(arrow)
	
	arrow.asc.logic_owner = ability.owner.logic_owner


func _on_update(_delta: float) -> void:
	end_ability()


func _end_ability() -> void:
	pass
